﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoderJoe.Samples.IndirectImplementation
{
	public static class Factory
	{
		public static IImplementation CreateImplementation()
		{
			Type t = Type.GetType("CoderJoe.Samples.IndirectImplementation.ActualImplementation, CoderJoe.Samples.IndirectImplementation.MyImplementation");
			if (t != null)
				return (IImplementation)Activator.CreateInstance(t);
			else
				return new FallbackImplementation();
		}
	}
}
